Repository navigation
Sample the video glow's colour only while playing, and write it as oklch() - #96
Merged
Merged
Conversation
The leaves of the media-first redesign (#76), split out so it can be reviewed in pieces. Nothing here changes how the current pages work: - styles/tokens.css: the design tokens the new shell and stage use. - motion/propflip: the shared FLIP helper for things that move between homes on the page. - lib: cast, cues, entities and transcript changes the stage and the live transcript build on. - utils/config: the config the redesign reads. - Icon, illustration and sponsor SVGs redrawn for the new palette. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A shared middle name is no longer taken for a shared surname. - Page names group full names before short aliases, so input order can't merge two Adams. - SRT <font> tags are stripped from timed cues. - The reduced-motion reset writes identity with transitions off. - Document that flip targets must not nest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The second slice of the media-first redesign (#76). One persistent <video> plays an episode's HLS video (hls.js outside Safari) or its MP3, moving between an episode's stage, a floating corner and the player bar. Shared state lives in components/state.ts; the island (components/media/Island) holds the scrubber, the medium switch and the Up next board. The layout still mounts the old player here: the shell slice swaps the island in and removes the old player components. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- First names that agree now pair with a short surname or an initial (Jen Lee ~ Jennifer Lee, Adam Argyle ~ Adam A.). - Cue tags strip in any case, and <span>/<br> go too, a break as a space. - The markdown transcript escapes decoded cue text, so it carries no HTML. - flipFrom() and commit() never scale from or to a zero size. - Drop propFlip() and .flip-hold: nothing calls them; flip() does the work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine: - Plays an MP3 without asking for CORS; only video, whose frames are sampled for the stage's light, is loaded with crossorigin. - A source that ran out of retries is forgotten, so the next Play loads it again where it stopped. - Saves progress only for the episode whose source is ready: a source being reset no longer writes 0 over the next episode's place. - Survives a failed hls.js import (falling back to the MP3) and drops a stale import's continuation by source generation. - Honours a Pause made while the next source loads. - Binds a deferred seek to its episode; a newer seek or another episode cancels it. The queue, board and island: - playNext() moves past an episode that ended while still in Up next. - The shelf is cached only once it loads; a failure is asked for again when the card opens. Every queued episode stays off the shelf, a cover gets artwork that arrives later, and a cover dropped on the shelf's last slot stays shown. - A drag belongs to one pointer, drops where it is released, and a cancel or a lost capture drops nothing. A board stopped mid-drag lets go of its listeners. - The card returns focus to what opened it, and closing mid-swipe resets the swipe's styles. Smaller fixes: one resume rule for the engine and every label (resumePoint), saved positions that aren't finite are ignored, cues are sorted before their binary search, the live script refetches for a new episode and drops late replies, the stage light blends after its first frame, and Watch/Listen takes arrow keys as a radio group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Redesign 1/6: foundations (tokens, motion, libraries)
- A video from a host without CORS headers is asked for again without CORS before the retry is spent, rather than never playing. - The chosen speed survives a new source (defaultPlaybackRate). - A lock-screen scrub keeps play or pause as it is. - A failed cue fetch isn't cached, so the transcript recovers. - Drop a swap error listener that never fired and later cut a retry's hold short. - Save the place on pause, seek and pagehide, not only every 5s playing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Redesign 2/6: media engine and the player island
The third slice of the media-first redesign (#76). An episode opens on its stage (EpisodeStage): the picture or artwork, the play controls and a live transcript line. Below it, a sticky section bar leads to the show notes, the people (guests first, hosts after), sponsors, the transcript and onward episodes. Transcript timestamps become seek chips (seek-chip in the rehype plugin), and whoever is speaking lights up wherever their portrait is. The episode page's styles are imported by the shell slice, which swaps in the new layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The section bar's glide re-aims when the transcript groups it passes settle to their real height, but groups above the section can still settle after it lands. Chromium and Firefox keep the section put with scroll anchoring; WebKit has none, so in CI's WebKit a link after the transcript opened left its section up to ~500px from the bar. Where overflow-anchor isn't supported the section is now held under the bar for 1.5s after the glide, until you take over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WebKit reports CSS.supports('overflow-anchor', 'auto') but doesn't keep a
section put when the transcript groups above it settle, so the hold
never ran there. It now runs everywhere: where scroll anchoring did its
job, the section is already in place and nothing moves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In CI's WebKit the hold left sections 1px off: it only corrected gaps over 2px, the glide's own tolerance. It now corrects anything over half a pixel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- LiveTurn reads the live group's own intersection entry. - Section links leave modified clicks (new tab or window) to the browser. - No speaker is published before the first line starts. - The split divider follows only the pointer that grabbed it. - Opening a preview unhides only its until-found groups. - Previews fade only when they clip something. - Groups still hidden until found keep the browser's content-visibility. - One set of phone limits for the live script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Focus opens a preview only on a control it cuts off. - Only transcripts are grouped and hidden until found; other markdown pages have no script to open them. - The section hold lets go when you scroll the page yourself. - No transcript turn is live before the first one starts. - Times in show-note code aren't turned into seek chips. - No 'More episodes' section when there's nowhere onward. - LONG_TURN counts characters, as its comment now says. - People without a photo get a face that follows light and dark mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merging the two phone blocks kept the one before the base .script rule, which overrides it at the same specificity, so phones got the desktop limits. The limits now sit where the block that applied them was: after the base rules and before the foldables, which override them in turn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The episode page's transcript heading is now "Transcript" and its timestamps are the shared seek chip, so the tests look for those, and for bold speaker names as proof of the markdown source. These updates came with the shell slice; they belong with the page that changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Redesign 3/6: the episode page, built around its stage
The fourth slice of the media-first redesign (#76). The home page is the whole archive as cards: search, filter by guest or topic and sort from a sticky toolbar, open a card in a close-up with its play, Up next and episode link, and come back to the card you left. Filters live in the URL (explorer/query), so a filtered view can be linked and stepped back through. Its styles are imported by the shell slice, which swaps in the new layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The close-up sticks under the toolbar, and the open card's artwork, facts, title, detail and play are anchored to slots inside it. Firefox resolves those anchors as if the close-up weren't stuck, so once the page has scrolled (opening a card scrolls it) the parts sat off their slots by the close-up's sticky offset: 54px in CI. A still, invisible marker anchored like the artwork shows where the browser puts it; on opening, scrolling and resizing the explorer measures it against the slot and the parts make up the gap through --xp-cu-fix. Where anchors follow a stuck box the gap is 0 and nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It showed from 30s on, where the engine resumes only past 30s (resumePoint, from #79's review). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In CI's Chromium the correction for Firefox's anchors sometimes fired: a measurement in the scroll event can read the marker before Chromium has moved anchored boxes for the scroll, which showed a 54px gap that wasn't there, and nothing measured again once the scroll stopped. Measurements now run in an animation frame (after scrolls, their end, resizes and opening), and a new correction is taken only when two frames in a row agree on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Back from an episode comes home to the row it was opened from (card or hero), remembered per episode. - An unreachable guests database leaves the archive without a cast rather than failing the home page; the cast is asked for once. - Details ids come from the card's index, so no two can collide. - A sort that moves cards in the DOM keeps keyboard focus where it was. - A pause updates the loaded card's progress, the In progress count and that cut, from the place the engine saved. - A progress bar clears once an episode is no longer in progress. - The close-up offers no saved resume for the loaded episode, and follows it when the loaded episode changes. - The live play control is unmounted when the page swaps. - In progress follows the engine's resume rule: past 30 seconds. - Without anchor positioning the archive no longer folds into the strip; the card opens in place. - Filter changes keep the address's fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Like transcripts, people now come from either of two optional sources: the guests database where it lists the episode, else the feed's <podcast:person> tags (name, role, photo, link). A feed name the database knows is that record, so one person has one id and photo across both. src/lib/people.ts gathers them once for the explorer, the episode page, the stage and the search palette; with neither source, the pieces that show people leave themselves out. Feed photos are resized like local ones. The JSON API's episodes carry the feed's people too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Astro's router treats a change of query as another page, so each filter step and each Back fetched and swapped the home page. A change of hash alone is the router's move within the page: no fetch, no swap, and Back and Forward step through it. The explorer now writes its state to the hash with navigate(), and follows the address on hashchange and the Navigation API's currententrychange, in place of intercepting popstate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Redesign 4/6: the home page becomes an episode explorer
The fifth slice of the media-first redesign (#76), where it comes together. The layout gains a resizable rail (drag, throw, double-click or step its divider), mounts the player island in place of the old player, and imports the redesign's styles. The about, contact, sponsor, 404 and for-LLMs pages and the search dialog move onto the new tokens; the old player components and their assets go. The e2e suites for the shell, the player, the explorer and the episode page land here, where the whole redesign runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A probe in CI's Firefox (#78) timed the home → episode → home trip at 2–3s and 1s on its own, with the page idle and frames on time, but 5–9s under the full suite's load: past Playwright's 5s default. The navigation steps wait up to 15s, as the card-return test already did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLAUDE.md still described code under the root src/ and a global.css that imported every stylesheet. The package now lives in packages/starpod/src, global.css starts with tailwind, anchored-auto-layout, propflip, tilt and search-icon, and pages import explorer.css and episode.css themselves. The package README omitted the starpod/components/PageHeader export that the reference sponsor page already uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each change to the explorer wrote the address with navigate(), and on its way the router rewrites the entry it is leaving. The explorer heard that as a move back to the old cut, re-ran the whole change to undo it (the search box briefly showing the old words), then ran it again when the new address landed: three full changes per keystroke. The address is now followed again only once the router has settled. Typing also no longer reads every card's place from storage (only the playing episode's moves), sets hidden only on cards whose state changes, and keys that land before a frame make one change. Timers and frames the explorer still had coming are cleared when the page swaps out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The feed was downloaded three times per build: once each by getShowInfo's and getAllEpisodes's rss-to-json parse, and once more for the raw-XML scan of video and people. The caches held values, not promises, so concurrent first callers fetched again. The feed text is now fetched once per process behind a shared promise (forgotten on failure so a retry refetches), and rss-to-json parses that text through an axios adapter. Episode pages made two sponsor queries each, and every episode renders at two paths. Sponsors and their episode counts now load once per build in lib/sponsors.ts, ordered by episode slug then sponsor id to keep the order the per-episode index lookup gave. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under CPU load Chromium stops updating :target-current: with 4x CDP throttling it stayed on the section scrolled away from after a link click (5/6 runs), and at 6x it never left Notes, even after programmatic scrolls and a wheel scroll. aria-current mirrored it, so the indicator and aria-current both stuck. CI's episode.spec section-link tests failed on this in Chromium only (the one browser with scroll-target-group). Firefox and WebKit already tracked the section in the script (the last section whose top reached the bar's line). Use that path everywhere and anchor the indicator to aria-current. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hls.js climbed to the 2160p rendition for the corner picture (measured 3840x2160 decoded into a picture a few hundred pixels wide), which costs viewers bandwidth and, in CI's software-decoding WebKit, all four cores. Capped, the corner plays 240p and the level rises when the picture grows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Point CLAUDE.md at packages/starpod and list PageHeader in the README
Delete dead code and stale references
Treat --slomo 0 as 0 so reduced motion skips the motion waits
One test logs each time the page sets the search box while `javascript` is typed, and expects none of those writes to change what the box holds. Without the `writing` guard in `fromAddress()`, the router's rewrite of the entry it leaves rolls the box back to the previous words on each key (`ja` to `j`) before restoring them. The other sets the search and picks Video in one task, before typing's frame runs, and expects the address and the box to keep the words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Do a keystroke's explorer work once, not three times
Fix CI e2e flakes: section links in Chromium, and 4K video in WebKit
The e2e jobs ran in the Playwright image, whose tag had to match the @playwright/test version by hand. They now install the browser for the version pnpm-lock.yaml resolves, cached per version and browser, so the lockfile is the only place the version lives. The exact pin in package.json goes back to a caret range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Let e2e run on any port and pin Playwright to the CI image
Fetch the feed once per build and load sponsors in one batch
Name the explorer filter, its clear buttons and the palette's groups
…anscript # Conflicts: # CLAUDE.md
Render the feed transcript on the server, not as a load island
Search the palette the way the explorer does
Find the explorer's search box by its new name in the typing tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main now holds media-redesign as one squashed commit (#110) with the same files, so this records it as merged without changing any. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Goal: merge
media-redesigninto main with confidence. Review found two problems with the floating picture's glow sampler (publish.ts):setIntervalon every page load, because the engine creates its media element at startup. Pages where nothing ever played still ran it.rgb(r g b)into--live-videoand--live-video-accent. The project rule is OKLCH only.What changed
toneSourcestarts the interval on the media'splayevent, or right away if it is already playing when a glow binds. It clears the interval onpause,endedandemptied. The last colour stays written, so the glow holds and doesn't snap.oklch()turns an sRGB triple intooklch(L C H)through OKLab. Channels are clamped to 0–255 like CSS does, becauseease()can round up to 256.ease()still averages and quantises in sRGB, so the drift and the "small changes write nothing" behaviour are unchanged. Averaging hue in OKLCH would wrap at 360°. Only the output format changed.tone-worker.test.tsnow feeds in a known two-colour frame and asserts the posted colours (dominant and vivid).publish.test.tschecks white, black, red, green and blue against the reference OKLab values (red isoklch(0.628 0.2577 29.23)). It also checks the 256 clamp, and that the sampler sets no interval untilplayand clears it onpause.Verification
pnpm test:unit: 31 files, 280 tests passed.pnpm lint: clean.pnpm build(astro check + build): exit 0.Player e2e on chromium (
player.spec.tsandplayer-phone.spec.ts): 9/9 passed.player-phone.spec.ts:50(swipe-down close) failed once.--repeat-each=3).Timer count, from a Playwright init script that tracks live
setIntervals created frompublish.ts:After pausing,
--live-video-accentwas unchanged 2.5 s later.Same colour before and after: I screenshotted the real corner glow with the same eased colour written as
rgb()and as the newoklch(). Pixel diff over 452,016 channels was 0 forrgb(240 16 240)(a value sampled live),rgb(144 144 144)and the clampedrgb(256 32 0).🤖 Generated with Claude Code